package seabattle.io;

public class Command {
	private String command;

	public Command(String command) {
		this.command = command;
	}

	public boolean isQuit() {
		return command.equalsIgnoreCase("q");
	}

	public int getX() {
		return Integer.parseInt(String.valueOf(command.charAt(1)));
	}

	public int getY() {
		String COLUMN_LETTER = "abcdefghij";
		return COLUMN_LETTER.indexOf(command.toLowerCase().charAt(0));

	}
}
